@class-prefix-number-keyboard: ~'adm-number-keyboard';

.@{class-prefix-number-keyboard} {
  &-main {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
  }

  &.confirmed-style {
    width: 75%;
    background-color: var(--adm-color-white);
  }

  &-popup {
    width: 100%;
    user-select: none;
    z-index: var(--adm-z-index-keyboard);
    .adm-popup-body {
      background-color: #f5f5f5;
    }
  }

  &-wrapper {
    display: flex;
  }

  &-header {
    height: 34px;
    line-height: 34px;
    border-top: solid 1px #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 12px;
    color: var(--adm-color-weak);
    background-color: var(--adm-color-white);
    &-close-button {
      padding: 0 12px;
      font-size: 16px;
    }
    &.with-title {
      justify-content: space-between;
      .@{class-prefix-number-keyboard}-header-close-button {
        padding-right: 0;
      }
    }
  }

  &-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  &-confirm {
    width: 25%;
  }

  &-key {
    flex: 1 33.33%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    font-size: 22px;
    box-sizing: border-box;
    border: solid 1px #f5f5f5;
    border-bottom: none;
    border-left: none;

    &:nth-child(3n),
    &:last-child {
      border-right: none;
    }

    &::before {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 100%;
      height: 100%;
      background-color: #000;
      border: inherit;
      border-color: #000;
      border-radius: inherit;
      transform: translate(-50%, -50%);
      opacity: 0;
      content: ' ';
      box-sizing: content-box;
    }

    &.mid-key {
      flex-basis: 66.67%;
    }

    &.sign-key:active::before {
      opacity: 0.1;
    }

    &.extra-key {
      border-left: solid 1px #f5f5f5;
      border-right: none;
    }

    &.extra-key,
    &.number-key {
      background-color: var(--adm-color-white);
      &:active::before {
        opacity: 0.1;
      }
    }

    &.ok-key {
      background-color: var(--adm-color-primary);
      color: var(--adm-color-white);
      height: 144px;
      font-size: 16px;
    }
  }

  &-bs-key {
    height: 20px;
  }
}
